﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Text;
using TTLL.Text;
using TTLL.Text.Range;
using TTLL.Text.Ruler;

namespace TTLang.Test.WordBreak
{
    [TestClass]
    public class Test_WordBreak_Rule
    {


        [TestMethod]
        public void ScannerString()
        {
            var breaker = TTLL.Text.WordBreaker.CreateCLikeBreaker();
            var wstr = @"
            ""adfasdf\""""
";
            var words = breaker.Split(wstr);
            foreach (var w in words)
            {
                Console.WriteLine(w.ToString());
            }

        }

        [TestMethod]
        public void ScannerMullineString()
        {
            var breaker = TTLL.Text.WordBreaker.CreateCLikeBreaker();
            var wstr = @"
12
@""
aa"""" spec
                bb
                cc
""
123
";
            var words = breaker.Split(wstr);
            foreach (var w in words)
            {
                Console.WriteLine(w.ToString());
            }

        }
        [TestMethod]
        public void ScannerComment()
        {
            var breaker = TTLL.Text.WordBreaker.CreateCLikeBreaker();
            var wstr = @"/*
    line1
    line2
    this is a comment
*/
//adfdsaf
123
12
";
            var words = breaker.Split(wstr);
            foreach (var w in words)
            {
                Console.WriteLine(w.ToString());
            }

        }
    }
}
